Skip to main content

Formatters

Formatter commands are useful for formatting text, including prose and identifiers in code. You use a formatter by saying the name of the formatter and then the words you want formatted. You can the full list of formatters by saying help formatters — formatter names are listed on the right and the example text "one two three" formatted by that formatter on the left.

Example: saying camel one two three will insert the text oneTwoThree.

Identifier FormatterDescriptionExample
camelcamel caseoneTwoThree
snakeunderscore (_) between wordsone_two_three
kabobhash (-) between wordsone-two-three
constantall caps with underscore between wordsONE_TWO_THREE
hammerPascal case: the start of each word is capitalizedOneTwoThree
smashlowercase with no separator symbolsonetwothree
dunderdouble underscore (__) between wordsone__two__three
Other Code FormatterDescriptionExample
dottedperiod (.) between wordsone.two.three
packeddouble colon (::) between wordsone::​two::three
stringwords surrounded by single quotes'one two three'
dub stringwords surrounded by double quotes"one two three"
congaslash (/) between wordsone/two/three
slasherslash (/) at the start and between words/one/two/three